package variabilitysmelldetection.measurement.measures.component;

import java.util.List;

import variabilitysmelldetection.measurement.measures.Measure;
import variabilitysmelldetection.measurement.models.ComponentItem;



public class NumberOfMethods extends Measure {

	public NumberOfMethods() {
		super("Number of Methods", "NOM");
	}

	@Override
	public void measure(List<ComponentItem> items) {
		for (ComponentItem classe : items) {
			measure(classe);
		}
	}	
	
	private void measure(ComponentItem componentItem) {
		NumberOfMethods noo = new NumberOfMethods();
		noo.setValue(componentItem.getMethods().size());
		componentItem.addMeasure(noo);
	}	
}